<template>
    <el-dialog
            title="弹窗缓存测试"
            :visible="visible"
            @close="$emit('close')"
            width="28%">
        <div style="width: 100%;height: 100px;display: flex;flex-direction: column;">
            <div style="flex: 0 1 50px;display: flex;justify-content: center;align-items: center;">
                num:{{num}}
            </div>
            <div style="flex: 1;display: flex;justify-content: space-between;">
                <el-button @click="num++">加</el-button>
                <el-button @click="num--">减</el-button>
            </div>
        </div>
    </el-dialog>
</template>
<script>
    export default {
        props: {
            visible: Boolean,  // 接收父组件的显示状态
        },
        data() {
            return {
                num: 1,
            }
        },
        created(){
            console.log("初始化T002_dialog");
        },
    }
</script>